define(function(require, exports, module) {
    'use strict';
    var rk = require('rk');
    require('../../su/xsySuHeader/widget');
    require('../xsyOpportunityButtonBar/widget');


    $.widget('rk.xsyOpportunityHeader', $.rk.xsySuHeader, {
        _params:{},
        _create: function(){
            var me = this;
            var elem = me.element;
            var opt = me.options;


            me._super();
        },
        _renderToolbar: function(result){
            var me = this;
            var opt = me.options;
            var elem = me.element;

            var wtype = 'xsyOpportunityButtonBar';

            elem.find('.xsy_su_header_menu').html('<div id="'+me.getUid()+'_buttonbar" wtype="'+wtype+'">&nbsp;</div>');
            elem.find('[wtype="'+wtype+'"]')[wtype]({
                toolbarData: result.self.toolBar
            });
        }
    });

})